<template>
  <div
    class="asset-table-box"
    :style="{ top, left, bottom, right }"
  >
    <div class="Wiki-header">
      <tableHeader>
        <span
          v-for="(item, index) in hederTextArray"
          :key="index"
          :style="{ width: item.width }"
        >{{ item.title }}</span>
      </tableHeader>
    </div>
    <div class="seamless-rolling">
      <div class="screan-area" :style="{ height: scrollHeight }">
        <!-- <vue3-seamless-scroll
          :list="listData"
          :step="0"
          :hover="true"
          :limitMoveNum="6"
          :wheel="true"
          class="seamless-warp"
        > -->
          <ul class="item">
            <li
              v-for="(item, index) in listData"
              :key="index"
              id="li-border">
              <span class="row-show" v-if="isIndex">
                <i
                  class="rank"
                  :class="[
                    index === '0' || index === '2' ? 'oneRank' : index === '1' ? 'twoRank' : 'threeRank'
                  ]"
                  v-if="isRank"
                >{{ index + 1 }}</i>
                <span v-else>{{ index + 1 }}</span>
              </span>
              <span
                class="row-show"
                v-for="(item2Text, index2) in tableTextArray"
                :key="index2"
              >
                <i
                  :class="colorKey.includes(item2Text) ? 'actived-color':''"
                  style="color: #fff; font-style: normal"
                >{{ item[item2Text] }}</i>
              </span>
            </li>
          </ul>
        <!-- </vue3-seamless-scroll> -->
      </div>
    </div>
  </div>
</template>

<script setup>
/* eslint-disable */
// eslint-disable-next-line vue/no-setup-props-destructure
import { computed, defineProps } from 'vue';
import tableHeader from './ComTableHeader.vue';

const props = defineProps({
  isIndex: Boolean,
  isRank: Boolean,
  tableTextArray: Array,
  listData: Array,
  hederTextArray: Array,
  top: String,
  bottom: String,
  left: String,
  right: String,
  height: String,
  scrollHeight: String,
  colorKey: Array
});
const isIndexFlag =  props.isIndex.value;
console.log(isIndexFlag);
// const classOption = computed(() => ({
//   step: 0,
//   limitMoveNum: 4,
//   hoverStop: true,
//   direction: 1, //0向下 1向上
//   singleHeight: 0,
//   singleWidth: 0,
//   waitTime: 2000,
//   openWatch: false, // 开启数据实时监控刷新dom
// }));
</script>

<style lang="scss" scoped>
/* CSS styles remain the same */
.seamless-rolling {
  font-size: 18px;
  color: #FFFFFF;
  letter-spacing: 0;
  text-align: center;
  font-weight: 500;
  .item {
    display: flex;
    flex-direction: column;
    #li-border {
      display: flex;
      padding: 17px 0;
      line-height: 18px;
      color: #fff;
      .update-time-color {
        color: #fff;
      }
      &:nth-child(even) {
        background: rgb(39, 108, 201, 0.15);
        color:#fff;
      }
      .row-show{
        flex: 1;
      }
    }
  }
  .screan-area {
    width: 100%;
    // overflow: hidden;
    overflow-y: auto;
  }
 .actived-color{
  color: rgb(23, 239, 226) !important;
 }
}
</style>